package com.lgx.mall.business.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lgx.mall.business.dao.IScoreGiftRecordsDao;
import com.lgx.mall.business.entity.ScoreGiftRecords;
import com.lgx.mall.business.service.IScoreGiftRecordService;

@Service
public class ScoreGiftRecordService implements IScoreGiftRecordService{
	
	@Autowired
	private IScoreGiftRecordsDao scoreGiftRecordsDao;

	public IScoreGiftRecordsDao getScoreGiftRecordsDao() {
		return scoreGiftRecordsDao;
	}

	/**
	 * 查找
	 */
	@Override
	public ScoreGiftRecords findSGRsById(Long id){
		return this.scoreGiftRecordsDao.findSGRsById(id);
	}

	/**
	 * 删除
	 */
	@Override
	public void deleteSGRs(ScoreGiftRecords scoreGiftRecords) throws Exception{
		this.scoreGiftRecordsDao.deleteSGRs(scoreGiftRecords);
	}

	/**
	 * 修改
	 */
	@Override
	public void updateSGRs(ScoreGiftRecords scoreGiftRecords) throws Exception{
		this.scoreGiftRecordsDao.updateSGRs(scoreGiftRecords);
	}

	/**
	 * 创建
	 */
	@Override
	public ScoreGiftRecords createOrder(ScoreGiftRecords scoreGiftRecords) throws Exception{
		return this.scoreGiftRecordsDao.createOrder(scoreGiftRecords);
	}

	/**
	 * 根据发起人id查找
	 */
	@Override
	public List<ScoreGiftRecords> findSGRs(Long fromId) throws Exception{
		return this.scoreGiftRecordsDao.findSGRs(fromId);
	}

}
